<template>
  <div class="comter">
    <div v-if="shop_manger_status==2">
      <div class="bj">
        <div class="top">
          <div>

          </div>
          <div class="topname">
            <span>{{UserSuper.nickname}}</span>
          </div>
          <div class="md">
            <div class="mditem">
              <img src="../../static/user/dmp.png" alt />
              <span>分享数</span>
              <span style="font-size:0.4rem;">{{UserSuper.sum}}</span>
            </div>
            <div
							class="mditem"
							@click="ewm = true"
						>
							<span style="padding-right:0.2rem;">二维码</span>
							<img
								src="../../static/user/rwms.png"
								alt
							/>
						</div>
          </div>
        </div>
      </div>
      <div class="ttj tjx">
         <div>
            <div class="tjt"><span>{{conversion_rate.weekConversionRate}}</span></div>
            <div><span>周转化率</span></div>
         </div>
         <div class="tjsimg">
           <img src="../../static/user/mtj.png" alt="">
         </div>
      </div>
      <div class="ttj tjxx">
         <div>
            <div class="tjt"><span>{{conversion_rate.monthConversionRate}}</span></div>
            <div><span>月转化率</span></div>
         </div>
         <div class="tjimg">
           <img src="../../static/user/ttj.png" alt="">
         </div>
      </div>
      <div class="ttj tjxxx">
         <div>
            <div class="tjt"><span>{{conversion_rate.weekCount}}</span></div>
            <div><span>访问总量</span></div>
         </div>
         <div class="tjimg">
           <img src="../../static/user/zltj.png" alt="">
         </div>
      </div>
      <yd-popup
				v-model="ewm"
				position="center"
				width="90%"
			>
				<div class="comewm">
					<div class>
						<img
							:src="qr_code"
							alt
						/>
					</div>
				</div>
			</yd-popup>
    </div>
    <examine v-else-if="shop_manger_status==0"></examine>
    <apply v-else :apply_type="apply_type"></apply>
  </div>
</template>
<script>
import apply from "@/components/examine_role/nocen";
import examine from "@/components/examine_role/noshy";

export default {
  name: "Agentshop",
  components: {
    apply,
    examine
  },
  data() {
    return {
      shop_manger_status: 1,
      apply_type: "F",
      ewm:false,
      qr_code:'',
      UserSuper: {
        nickname: "用户昵称",
        sum:'00'
      },
      conversion_rate: {
				monthConversionRate: 0,
				weekConversionRate: 0,
				weekCount: 0
			},
    };
  },
  computed: {
    /*
     * 显示商家列表
     * 作者：gzt
     * 时间：2019-11-29 16:38:45
     */
    show_business_list() {
      if (this.business.length > 0) {
        return true;
      }
      return false;
    }
  },
  mounted() {
    //   查询当前用户是否是分享达人及已申请的状态
    this.get_share_person();
  },
  methods: {
    /*
     * 获取探店官的详细信息
     * 作者：gzt
     * 时间：2019-11-29 14:28:48
     */
    get_share_person() {
      let _this = this;
      this.$post(this.$api.account.users_upershare_byid,{
            id:1
      }).then(res => {
        if (res.success) {
          // 分享达人的状态
        //  _this.shop_manger_status = res.data.status;
           if(_this.shop_manger_status == 2){
              _this.get_shop_manager();
							_this.shop_manager_conversion_rate();
           }
        }
      });
    },

    // 获取分享达人基本信息
    get_shop_manager(){
        
    },

    // 获取分享达人转化率
    shop_manager_conversion_rate(){
    
    },

  }
};
</script>
<style>
.comter {
	height: 100%;
}
.bj {
  height: 2.5rem;
  background: url("../../static/user/top.png");
  background-size: 100% 100%;
  margin: 0.35rem;
  border-radius: 5px;
}
.topname {
  text-align: left;
  font-size: 0.5rem;
  padding: 0.5rem 0.75rem 0rem 0.65rem;
  color: #fff;
}
.md {
  display: flex;
  padding: 0.15rem 0.5rem;
  color: #fff;
}
.mditem {
  width: 50%;
  display: flex;
  padding: 0rem 0.2rem;
  justify-content: flex-start;
  align-items: center;
}
.mditem img {
  height: 0.35rem;
  padding-right: 0.2rem;
  display: flex;
}

.ttj {
  margin: 0.35rem;
  color:#fff;
  border-radius: 5px;
  box-shadow: 1px 5px 10px 1px #d0d1d2;
  text-align: left;
  height:2rem;
  padding: 0.3rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tjimg img{
  height:1.4rem;
}
.tjsimg img{
  height:1.6rem;
}
.tjt{
  font-size:0.6rem;
}
.tjx {
   background-image: linear-gradient(to right, #bfb2bb, #f6f8f9);
}
.tjxx {
   background-image: linear-gradient(to right, #d5ab75, #f6f8f9);
}
.tjxxx {
   background-image: linear-gradient(to right, #43aebf, #f6f8f9);
}
.sz {
  color: #369fff;
  font-size: 0.6rem;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}
.sj {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem;
  margin-top: -1.8rem;
}
.mk {
  height: 1.8rem;
  border-radius: 5px;
  width: 3.2rem;
  font-size: 0.35rem;
  color: #fff;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}
.blue {
  background-image: linear-gradient(to right, #54d4ff, #369fff);
}
.zs {
  background-image: linear-gradient(to right, #a965e6, #823eb5);
}
.lists {
  background: #fff;
  border-radius: 5px;
  margin: -1.6rem 0.35rem 1rem 0.35rem;
}
.sylist {
  font-size: 0.35rem;
  padding: 0.3rem 0.4rem;
  display: flex;
}
.sylist img {
  height: 0.5rem;
  padding-right: 0.2rem;
}
.listsy {
  padding: 0rem 0.2rem;
}
.syitem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.05rem 0rem;
}
.syitem div {
  height: 0.6rem;
  display: flex;
  align-items: center;
  width: 33%;
  justify-content: center;
  color: #999;
}
.xz {
  background: #f5f5f5;
}
.tl {
  font-weight: bold;
  font-size: 0.28rem;
}
.comewm {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  height: 5rem;
}
.comewm img {
  height: 100%;
  width: 100%;
}

.syy {
  padding: 0rem;
}
.syitemss {
  display: flex;
  text-align: left;
  align-items: center;
  font-size: 0.28rem;
  border-bottom: 1px solid #f5f5f5;
  margin: 0.3rem;
  padding-bottom: 0.2rem;
}
.shlogo {
  width: 1.4rem;
  display: flex;
  align-items: center;
}
.shlogo img {
  height: 1.1rem;
  border-radius: 3px;
}

.shinfo {
  flex: 1;
}
.info {
}
.infos {
  color: #999;
}
.sys {
  color: red;
  width: 1rem;
  text-align: right;
}
.tjsl {
  display: flex;
  justify-content: space-between;
}
.item_tj {
  width: 33%;
  text-align: center;
}
</style>
